<?php /* Smarty version 2.6.20, created on 2011-08-20 16:03:12
         compiled from /home/users/surfaceweb/public_html/sosjob/modules/addnew/views/init.tpl */ ?>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAHy-4chTxWi7fRAXj5xfkGRTuvTg5PsYyU7sA2ihJ2L73JhN5hhSRXNYnVkt16szDhN4ri_v5nyt4Mg"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['url']; ?>
public/js/googleMap.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['url']; ?>
public/js/service.js"></script>
<?php echo '
<script type="text/javascript">
    setMarker = false;
    $(document).ready(function(){
        startMap();
        service.setMarkers();
        service.setSite();
        
        $(\'#searchCity\').click(function(){
            service.setCity();
        });

        $(\'#markerButton\').click(function(){
            service.addNewMarkerToMap();
        });

        $(\'#includeCompanyData\').click(function(){
            $(\'.companyData\').toggle();
        });
        $(\'#category\').change(function(ev){
            service.getChildCategories(ev, this);
        });
        $("#backCategory").click(function(){
            service.backToParentCategory();
        });
        $("#distance").change(function(){
            service.giveDistance($(\'#distance\').val());
        });
        $(\'.hideError\').hide();
    });
</script>
'; ?>

<div id="dodajMainContent">
        <h1>Dodaj ofertę</h1>

        <form id="addServiceForm" method="post" action="<?php echo $this->_tpl_vars['url']; ?>
zaproponuj-usługi/2">
                <input type="hidden" name="lon" id="mainLon" value="52.228220003460486">
                <input type="hidden" name="lat" id="mainLat" value="21.011524200439453">
                <ul id="offer1" class="one_offer">
                        <li>
                            <!--<input id="markerButton" type="button" class="add_new_point" value=""/>-->
                            <table class="mb-20">
                                 <tr>
                                     <td class="cityLabel">Miasto</td>
                                     <td><input class="inputStyle" id="city" name="city" /></td>
                                     <td><input class="buttonActionMain" type="button" name="searchCity" id="searchCity" value="Szukaj" /></td>
                                 </tr>
                            </table>
                            <div class="map" id="map"></div>
                        </li>
                        <li class="border">
                            <h2>Zasięg prac</h2>
                            <select id="distance" name='distance'>
                                <option selected="selected">1</option>
                                <option>2</option>
                                <option>3</option>
                                <option>5</option>
                                <option>10</option>
                                <option>15</option>
                                <option>20</option>
                                <option>25</option>
                                <option>30</option>
                                <option>35</option>
                            </select>
                        </li>
                        <li class="border">
                                <h2>Imię</h2>
                                <input class="text clear <?php if (! empty ( $this->_tpl_vars['message']['form']['name'] )): ?>redError<?php endif; ?>" type="text" name="name" value="<?php echo $this->_tpl_vars['filtr']['name']; ?>
" />
                        </li>
                        <li class="border">
                                <h2>Nazwisko</h2>
                                <input class="text clear <?php if (! empty ( $this->_tpl_vars['message']['form']['surname'] )): ?>redError<?php endif; ?>" type="text" name="surname" value="<?php echo $this->_tpl_vars['filtr']['surname']; ?>
" />
                        </li>
                        <li class="border">
                                <h2>Email</h2>
                                
                                <input id="dodaj_tytul" class="text clear <?php if (! empty ( $this->_tpl_vars['message']['form']['email'] )): ?>redError<?php endif; ?>" type="text" name="email" value="<?php echo $this->_tpl_vars['filtr']['email']; ?>
" />
                        </li>
                        <li class="border">
                            <div>
                                <div id="catTitle"><h2>Kategoria</h2></div>
                                <div id="catCombo">
                                    <select id="category" name="category">
                                            <?php $_from = ($this->_tpl_vars['mainCategories']); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['value']):
?>
                                                    <option <?php if ($this->_tpl_vars['value']['id'] == $this->_tpl_vars['filtr']['category']): ?> selected="selected" <?php endif; ?>
                                                        value="<?php echo $this->_tpl_vars['value']['id']; ?>
"><?php echo $this->_tpl_vars['value']['name']; ?>
</option>
                                            <?php endforeach; endif; unset($_from); ?>
                                    </select>
                                </div>
                                <div id="catBackButton">
                                    <input type="button" class="buttonActionMain <?php if (! empty ( $this->_tpl_vars['message']['form']['category'] )): ?>redError<?php endif; ?>" id="backCategory" value="wstecz" />
                                </div>
                              </div>
                        </li>
                        <li class="border">
                                <h2>Cena za godzinę</h2>
                                
                                <input id="dodaj_adres" class="text clear <?php if (! empty ( $this->_tpl_vars['message']['form']['pricePerHour'] )): ?>redError<?php endif; ?>" type="text" name="pricePerHour" value="<?php echo $this->_tpl_vars['filtr']['pricePerHour']; ?>
" />
                        </li>
                        <li class="border">
                                <h2>Cena za całą usługę</h2>
                                                                                         
                                <input id="dodaj_adres" class="text clear <?php if (! empty ( $this->_tpl_vars['message']['form']['pricePerService'] )): ?>redError<?php endif; ?>" type="text" name="pricePerService" value="<?php echo $this->_tpl_vars['filtr']['pricePerService']; ?>
" />
                        </li>
                        <li class="border" style="height: 59px;">
                            <h2></h2>
                        </li>
                        <li>
                                <h2>Opis oferty</h2>
                                
                                <textarea id="dodaj_opis1" class="clear dodaj_opis <?php if (! empty ( $this->_tpl_vars['message']['form']['description'] )): ?>redError<?php endif; ?>" type="text" name="description"><?php echo $this->_tpl_vars['filtr']['description']; ?>
</textarea>
                        </li>
                        <li>
                            <div id="companyLabel"><h2>Firma</h2></div>
                            <div id="companyButton">
                                <input type="checkbox" id="includeCompanyData" name="includeCompanyData" <?php if ($this->_tpl_vars['filtr']['includeCompanyData']): ?>checked="checked" <?php endif; ?> />
                            </div>
                        </li>
                        <li class="border companyData" <?php if (! $this->_tpl_vars['filtr']['includeCompanyData']): ?>style="display: none;" <?php endif; ?> >
                                <h2>Nazwa firmy</h2>
                                
                                <input id="companyName" class="text clear <?php if (! empty ( $this->_tpl_vars['message']['form']['companyName'] )): ?>redError<?php endif; ?>" type="text" name="companyName" value="<?php echo $this->_tpl_vars['filtr']['companyName']; ?>
" />
                        </li>
                        <li class="border companyData" <?php if (! $this->_tpl_vars['filtr']['includeCompanyData']): ?>style="display: none; width: 452px;" <?php endif; ?>>
                                <input id="nip" class="text clear" type="hidden" name="nip" value="<?php echo $this->_tpl_vars['filtr']['nip']; ?>
" />
                        </li>
                        <li class="last">
                        </li>
                </ul>

            <input type="hidden" value="<?php echo $this->_tpl_vars['site_address']; ?>
" id="siteAddress" name="site_address" />
            <input class="inputStyle" id="addServiceButton" type="submit" value="" />
        </form>

</div>